-------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /homes/nber/jetson-dua57641/gruber-DUA57641/jetson-dua57641/ambula
> nce/replication/logs/firm_eventstudy.log
  log type:  text
 opened on:  16 Jul 2024, 14:49:51

. 
. /****************************************************************************
> ***
> firm_eventstudy.do
> 
> This code creates event studies for incapacitated firms
> *****************************************************************************
> **/
. 
. qui {

. 
. collapse (mean) linepmt (mean) ride (mean) firmactive, by(reltime firmenforce
> menttype_civil)

. 
. sort firmenforcementtype_civil reltime

. 
. *Figure 12
. twoway line linepmt reltime if firmenforcementtype_civil == 1, xline(0, lcolo
> r(gs8)) graphregion(color(white)) xti("Months Until Civil Enforcement") yti("
> Mean Firm Non-Emergency Dialysis Payments") yscale(range(0 20000)) ylab(#4)

. qui graph export "${outpath}Figure_12a.pdf", replace

. 
. twoway line linepmt reltime if firmenforcementtype_civil == 0, xline(0, lcolo
> r(gs8)) graphregion(color(white)) xti("Months Until Criminal Enforcement") yt
> i("Mean Firm Non-Emergency Dialysis Payments") yscale(range(0 20000))

. qui graph export "${outpath}Figure_12b.pdf", replace

. 
. *Figure A19
. twoway line firmactive reltime if firmenforcementtype_civil == 0, xline(0, lc
> olor(gs8)) graphregion(color(white)) xti("Months Until Criminal Enforcement")
>  yti("Share Firms Active") yscale(range(0 .8)) ylab(#5)

. qui graph export "${outpath}Figure_A19d.pdf", replace

. 
. twoway line firmactive reltime if firmenforcementtype_civil == 1, xline(0, lc
> olor(gs8)) graphregion(color(white)) xti("Months Until Civil Enforcement") yt
> i("Share Firms Active") yscale(range(0 .8)) ylab(#5)

. qui graph export "${outpath}Figure_A19c.pdf", replace

. 
. twoway line ride reltime if firmenforcementtype_civil == 0, xline(0, lcolor(g
> s8)) graphregion(color(white)) xti("Months Until Criminal Enforcement") yti("
> Mean Firm Non-Emergency Dialysis Rides") xlab(-24 -12 0 12 24) yscale(range(0
>  80)) ylab(#5)

. qui graph export "${outpath}Figure_A19b.pdf", replace

. 
. twoway line ride reltime if firmenforcementtype_civil == 1, xline(0, lcolor(g
> s8)) graphregion(color(white)) xti("Months Until Civil Enforcement") yti("Mea
> n Firm Non-Emergency Dialysis Rides") xlab(-24 -12 0 12 24) yscale(range(0 80
> ))  ylab(#5)

. qui graph export "${outpath}Figure_A19a.pdf", replace

. 
. log close
      name:  <unnamed>
       log:  /homes/nber/jetson-dua57641/gruber-DUA57641/jetson-dua57641/ambula
> nce/replication/logs/firm_eventstudy.log
  log type:  text
 closed on:  16 Jul 2024, 14:49:53
-------------------------------------------------------------------------------
